package cn.dansj.common.utils.bean;

import cn.dansj.common.utils.enums.GlobalEnv;
import cn.dansj.common.utils.transfer.DefaultMethods;

import java.io.Serializable;

public class RequestToken extends DefaultMethods implements Serializable {
    private static final long serialVersionUID = GlobalEnv.SerialVersionUID;
    private String token;
    private long tokenTimestamp;
    private String currentPath;
    private String platform;
    private final String tokenUid;

    public RequestToken(String token, long tokenTimestamp, String currentPath, String platform) {
        this.token = GlobalEnv.CacheTokenPrefix + token;
        this.tokenTimestamp = tokenTimestamp;
        this.currentPath = currentPath;
        this.platform = platform;
        this.tokenUid = token;
    }

    public String getToken() {
        return token;
    }

    public RequestToken setToken(String token) {
        this.token = GlobalEnv.CacheTokenPrefix + token;
        return this;
    }

    public long getTokenTimestamp() {
        return tokenTimestamp;
    }

    public RequestToken setTokenTimestamp(long tokenTimestamp) {
        this.tokenTimestamp = tokenTimestamp;
        return this;
    }

    public String getCurrentPath() {
        return currentPath;
    }

    public RequestToken setCurrentPath(String currentPath) {
        this.currentPath = currentPath;
        return this;
    }

    public String getPlatform() {
        return platform;
    }

    public RequestToken setPlatform(String platform) {
        this.platform = platform;
        return this;
    }

    public String getTokenUid() {
        return tokenUid;
    }
}
